package com.seedwill.common.persistence;

/**
 * @author kdyi
 *
 */
public class OrderBy implements java.io.Serializable {
	/**
	 * 构造器
	 * @param orderPropName
	 */
	public OrderBy(String orderPropName) {
		super();
		this.orderPropName = orderPropName;
	}
	
	/**
	 * 构造器
	 * @param orderPropName
	 * @return
	 */
	public static OrderBy orderBy(String orderPropName){
		return new OrderBy(orderPropName);
	}
	/**
	 * 构造器
	 * @param orderPropName
	 * @param ascend
	 */
	public OrderBy(String orderPropName, boolean ascend) {
		super();
		this.orderPropName = orderPropName;
		this.ascend = ascend;
	}
	
	/**
	 * 排序属性
	 */
	private String orderPropName;
	
	/**
	 * 获取排序属性
	 * @return
	 */
	public String getOrderPropName() {
		return orderPropName;
	}
	
	/**
	 * 设置排序属性
	 * @param orderPropName
	 */
	public void setOrderPropName(String orderPropName) {
		this.orderPropName = orderPropName;
	}
	
	/**
	 * 是否增序
	 * @return
	 */
	public boolean isAscend() {
		return ascend;
	}
	
	/**
	 * 设置是否增序
	 * @param ascend
	 */
	public void setAscend(boolean ascend) {
		this.ascend = ascend;
	}
	
	/**
	 * 是否增序
	 */
	private boolean ascend;

}
